set w to get_previous_instance(the windowList, the windowName of me)
if objectp(w) then
forget(w)
end if
if the windowName of me <> EMPTY then
set w to window the windowName of me
set the titleVisible of w to 1
else
set w to window "temp"
set the titleVisible of w to 0
end if
set the fileName of w to get_filename(the windowMovie of me)
set the windowType of w to get_window_style(me)
set the rect of w to rect(the windowLeft of me, the windowTop of me, the windowLeft of me + the windowWidth of me, the windowTop of me + the windowHeight of me)
open(w)
end
on get_previous_instance w_list, w_name
repeat with i = count(w_list) down to 1
set w to getAt(w_list, i)
if the name of w = w_name then
return w
end if
end repeat
return -1
end
on get_window_style me
case the windowType of me of
#Document:
set zoomable to 0
if the zoomable of me then
if the sizable of me then
set t to 8
else
set t to 12
end if
else
if the sizable of me then
set t to 0
else
set t to 4
end if
end if
#palette:
set t to 49
#Rounded:
set t to 16
#plain:
set t to 2
#shadow:
set t to 3
"Modal Dialog":
set t to 1
"Movable Modal Dialog":
set t to 5
otherwise:
set t to 4
end case
return t
end
on get_filename f_name
if not (f_name contains ".dir") then
set f_name to f_name & ".dir"
end if
if (f_name contains "/") or (f_name contains "\") then
return "Opens an independent Director Movie in a Window of the designated type." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Movie Name - filename of movie to be opened." & RETURN & "ΓÇó Window Name - ( optional ) label to be displayed in window header, when visible." & RETURN & "ΓÇó Window Style - border style and interactivity options." & RETURN & "ΓÇó Resize Box - make window resizable when appropriate." & RETURN & "ΓÇó Left, Top - initial offset ( in pixels ) of the window from the upper left corner of the display." & RETURN & "ΓÇó Width, Height - ( optional ) initial dimensions ( in pixels ) of the window." & RETURN & "ΓÇó Triggering Event - event that will open the movie." & RETURN & "MESSAGES:" & RETURN & "ΓÇó Trigger - open a window using the current parameters."